<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 订单管理</title>
    <link href="./js/bootstrap.min.css" rel="stylesheet">
    <link href="./js/bootstrap-icons.css" rel="stylesheet">
    <link rel="stylesheet" href="css/index.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f8fafc;
        }

        /* 顶部导航栏 */
        .top-nav {
            height: 60px;
            background-color: #2563eb;
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
        }

        .logo {
            font-size: 20px;
            font-weight: bold;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        /* 主体布局 */
        .main-container {
            display: flex;
            margin-top: 60px;
            height: calc(100vh - 60px);
        }

        /* 左侧菜单栏 */
        .sidebar {
            width: 220px;
            background-color: #1e293b;
            color: white;
            height: 100%;
            position: fixed;
            overflow-y: auto;
            transition: all 0.3s;
        }

        .sidebar.collapsed {
            width: 80px;
        }

        .menu-toggle {
            padding: 15px 20px;
            cursor: pointer;
            border-bottom: 1px solid #334155;
        }

        .menu-items {
            padding: 10px 0;
        }

        .menu-item {
            padding: 12px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .menu-item:hover {
            background-color: #334155;
        }

        .menu-item.active {
            background-color: #2563eb;
        }

        .menu-text {
            white-space: nowrap;
            overflow: hidden;
        }

        .sidebar.collapsed .menu-text {
            display: none;
        }

        .sidebar.collapsed .menu-item {
            justify-content: center;
        }

        /* 内容区 */
        .content {
            flex: 1;
            margin-left: 220px;
            padding: 20px;
            transition: margin-left 0.3s;
        }

        .sidebar.collapsed ~ .content {
            margin-left: 80px;
        }

        /* 面包屑导航 */
        .breadcrumb-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        /* 卡片样式 */
        .card {
            background: white;
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            padding: 20px;
            margin-bottom: 20px;
        }

        .card-title {
            font-size: 18px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 20px;
        }

        /* 表格样式 */
        .table-container {
            overflow-x: auto;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
        }

        th {
            background-color: #f1f5f9;
            font-weight: 600;
            color: #1e293b;
        }

        tr:hover {
            background-color: #f8fafc;
        }

        /* 按钮样式 */
        .btn {
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            border: none;
            margin: 2px;
        }

        .btn-primary {
            background-color: #2563eb;
            color: white;
        }

        .btn-success {
            background-color: #10b981;
            color: white;
        }

        .btn-warning {
            background-color: #f59e0b;
            color: white;
        }

        .btn-danger {
            background-color: #ef4444;
            color: white;
        }

        .btn-outline {
            background-color: transparent;
            border: 1px solid #cbd5e1;
            color: #64748b;
        }

        .btn-sm {
            padding: 4px 8px;
            font-size: 11px;
        }

        /* 筛选器 */
        .filter-row {
            display: flex;
            gap: 15px;
            align-items: end;
            flex-wrap: wrap;
            margin-bottom: 15px;
        }

        .filter-item {
            flex: 1;
            min-width: 150px;
        }

        .filter-item label {
            display: block;
            margin-bottom: 5px;
            font-weight: 500;
        }

        .filter-item input,
        .filter-item select {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
        }

        .filter-actions {
            display: flex;
            gap: 10px;
            align-items: end;
        }

        /* 状态标签 */
        .status-badge {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .status-paid {
            background-color: #dbeafe;
            color: #1d4ed8;
        }

        .status-verified {
            background-color: #dcfce7;
            color: #166534;
        }

        .status-refunding {
            background-color: #fef3c7;
            color: #92400e;
        }

        .status-cancelled {
            background-color: #fee2e2;
            color: #991b1b;
        }

        /* 分页 */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin-top: 20px;
        }

        .page-item {
            padding: 8px 12px;
            border: 1px solid #cbd5e1;
            cursor: pointer;
        }

        .page-item.active {
            background-color: #2563eb;
            color: white;
        }

        /* 弹窗样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 2000;
            align-items: center;
            justify-content: center;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 8px;
            width: 600px;
            max-width: 90%;
            max-height: 90%;
            overflow-y: auto;
        }

        .modal-header {
            padding: 20px;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-body {
            padding: 20px;
        }

        .modal-footer {
            padding: 20px;
            border-top: 1px solid #e2e8f0;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .close {
            font-size: 24px;
            cursor: pointer;
        }

        /* 订单详情样式 */
        .order-detail-section {
            margin-bottom: 20px;
            padding-bottom: 20px;
            border-bottom: 1px solid #e2e8f0;
        }

        .order-detail-section:last-child {
            border-bottom: none;
        }

        .section-title {
            font-size: 16px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 15px;
        }

        .detail-row {
            display: flex;
            margin-bottom: 10px;
        }

        .detail-label {
            width: 120px;
            color: #64748b;
            font-weight: 500;
        }

        .detail-value {
            flex: 1;
            color: #1e293b;
        }

        /* 下拉菜单 */
        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropdown-content {
            display: none;
            position: absolute;
            background-color: white;
            min-width: 160px;
            box-shadow: 0 8px 16px rgba(0,0,0,0.1);
            z-index: 1;
            border-radius: 4px;
            right: 0;
            top: 100%;
        }

        .dropdown-content a {
            color: #1e293b;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
        }

        .dropdown-content a:hover {
            background-color: #f1f5f9;
        }

        .dropdown:hover .dropdown-content {
            display: block;
        }

        /* 响应式 */
        @media (max-width: 768px) {
            .filter-row {
                flex-direction: column;
            }
            
            .filter-item {
                min-width: 100%;
            }
            
            .detail-row {
                flex-direction: column;
            }
            
            .detail-label {
                width: 100%;
                margin-bottom: 5px;
            }
        }
    </style>
</head>
<body>
    <!-- 顶部导航栏 -->
    <div class="top-nav">
        <div class="logo">管理系统</div>
        <div class="user-info">
            <div class="notification-icon">🔔</div>
            <div class="user-dropdown">
                <span>管理员 ▼</span>
            </div>
        </div>
    </div>

    <!-- 主体布局 -->
    <div class="main-container">
         <!-- 左侧菜单栏 -->
         <div class="sidebar" id="sidebar">
            <div class="menu-toggle" onclick="toggleSidebar()">☰ 菜单</div>
            <div class="menu-items">
                <div class="menu-item">
                    <a href="./index.html">
                        <span>📊</span>
                        <span class="menu-text">仪表盘</span>
                    </a>
                  
                </div>
                <div class="menu-item">
                    <a href="./dianpu.html">
                        <span>🏪</span>
                        <span class="menu-text">店铺管理</span>
                    </a>
                   
                </div>
                <div class="menu-item">
                    <a href="./jiqiren.html">
                        <span>🤖</span>
                        <span class="menu-text">机器人管理</span>
                    </a>
                 
                </div>
                <div class="menu-item active">
                    <a href="./order.html">
                        <span>📋</span>
                        <span class="menu-text">订单管理</span>
                    </a>
                   
                </div>
                <div class="menu-item ">
                    <span>👥</span>
                    <span class="menu-text">用户会员管理</span>
                    <span>▶</span>
                </div>
                <div class="submenu">
                    <div class="submenu-item">
                        <a href="./user.html">
                            <span>├─</span>
                            <span class="menu-text">用户会员列表</span>
                        </a>
                      
                    </div>
                    <div class="submenu-item ">
                        <a href="./vip.html">
                            <span>├─</span>
                            <span class="menu-text">会员等级配置</span>
                        </a>
                        
                    </div>
                </div>
                <div class="menu-item ">
                    <a href="./fuwu.html">
                        <span>🎯</span>
                        <span class="menu-text">服务套餐类型</span>
                    </a>
                </div>
                <div class="menu-item">
                    <span>🎯</span>
                    <span class="menu-text">促销管理(二期)</span>
                </div>
                <div class="menu-item">
                    <span>📈</span>
                    <span class="menu-text">数据统计(二期)</span>
                </div>
                <div class="menu-item">
                    <span>⚙️</span>
                    <span class="menu-text">系统设置</span>
                </div>
            </div>
        </div>

        <!-- 中间内容区 -->
        <div class="content">
            <!-- 订单列表页 -->
            <div id="orderListPage">
                <!-- 面包屑导航 -->
                <div class="breadcrumb-nav">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">订单管理</li>
                            <li class="breadcrumb-item active">所有订单</li>
                        </ol>
                    </nav>
                    <div class="dropdown">
                        <button class="btn btn-primary">
                            <i class="bi bi-download"></i> 导出数据
                        </button>
                        <div class="dropdown-content">
                            <a href="#" onclick="exportData('current')">导出当前页</a>
                            <a href="#" onclick="exportData('filtered')">导出筛选结果</a>
                        </div>
                    </div>
                </div>

                <!-- 筛选器 -->
                <div class="card">
                    <div class="card-title">筛选条件</div>
                    <div class="filter-row">
                        <div class="filter-item">
                            <label>订单状态</label>
                            <select>
                                <option value="">全部</option>
                                <option value="已支付">已支付</option>
                                <option value="已核销">已核销</option>
                                <option value="退款中">退款中</option>
                                <option value="已取消">已取消</option>
                            </select>
                        </div>
                        <div class="filter-item">
                            <label>时间范围</label>
                            <select id="timeRange" onchange="handleTimeRangeChange()">
                                <option value="">请选择</option>
                                <option value="today">今日</option>
                                <option value="yesterday">昨日</option>
                                <option value="7days">近7日</option>
                                <option value="30days">近30日</option>
                                <option value="custom">自定义</option>
                            </select>
                        </div>
                        <div class="filter-item">
                            <label>支付方式</label>
                            <select>
                                <option value="">全部</option>
                                <option value="微信支付">微信支付</option>
                                <option value="支付宝">支付宝</option>
                                <option value="银行卡">银行卡</option>
                            </select>
                        </div>
                    </div>
                    <div class="filter-row">
                        <div class="filter-item">
                            <label>订单号</label>
                            <input type="text" placeholder="请输入订单号">
                        </div>
                        <div class="filter-item">
                            <label>用户名</label>
                            <input type="text" placeholder="请输入用户名">
                        </div>
                        <div class="filter-item">
                            <label>店铺</label>
                            <select>
                                <option value="">全部</option>
                                <option value="朝阳店">朝阳店</option>
                                <option value="海淀店">海淀店</option>
                                <option value="丰台店">丰台店</option>
                            </select>
                        </div>
                        <div class="filter-actions">
                            <button class="btn btn-primary">搜索</button>
                            <button class="btn btn-outline">重置</button>
                        </div>
                    </div>
                </div>

                <!-- 订单表格 -->
                <div class="card">
                    <div class="table-container">
                        <table>
                            <thead>
                                <tr>
                                    <th>订单号</th>
                                    <th>用户</th>
                                    <th>店铺</th>
                                    <th>服务类型</th>
                                    <th>金额</th>
                                    <th>状态</th>
                                    <th>支付时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>24100501</td>
                                    <td>李**</td>
                                    <td>朝阳店</td>
                                    <td>基础洗头</td>
                                    <td>58元</td>
                                    <td><span class="status-badge status-verified">已核销</span></td>
                                    <td>2024-10-05 14:30</td>
                                    <td>
                                        <button class="btn btn-outline btn-sm" onclick="showOrderDetail('24100501')">查看详情</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>24100502</td>
                                    <td>王**</td>
                                    <td>海淀店</td>
                                    <td>头皮护理</td>
                                    <td>88元</td>
                                    <td><span class="status-badge status-paid">已支付</span></td>
                                    <td>2024-10-05 15:45</td>
                                    <td>
                                        <button class="btn btn-outline btn-sm" onclick="showOrderDetail('24100502')">查看详情</button>
                                        <button class="btn btn-warning btn-sm" onclick="showCancelOrderModal('24100502')">取消订单</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>24100503</td>
                                    <td>张**</td>
                                    <td>丰台店</td>
                                    <td>基础洗头</td>
                                    <td>58元</td>
                                    <td><span class="status-badge status-refunding">退款中</span></td>
                                    <td>2024-10-05 16:20</td>
                                    <td>
                                        <button class="btn btn-outline btn-sm" onclick="showOrderDetail('24100503')">查看详情</button>
                                        <button class="btn btn-danger btn-sm" onclick="showRefundModal('24100503')">处理退款</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>24100504</td>
                                    <td>赵**</td>
                                    <td>朝阳店</td>
                                    <td>深层清洁</td>
                                    <td>128元</td>
                                    <td><span class="status-badge status-cancelled">已取消</span></td>
                                    <td>2024-10-05 13:15</td>
                                    <td>
                                        <button class="btn btn-outline btn-sm" onclick="showOrderDetail('24100504')">查看详情</button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>

                <!-- 分页 -->
                <div class="pagination">
                    <button class="page-item">上一页</button>
                    <button class="page-item active">1</button>
                    <button class="page-item">2</button>
                    <button class="page-item">3</button>
                    <span>...</span>
                    <button class="page-item">12</button>
                    <button class="page-item">下一页</button>
                    <div style="display: flex; align-items: center; gap: 10px; margin-left: 20px;">
                        <span>跳至第</span>
                        <input type="number" style="width: 60px; padding: 5px;" min="1" max="12">
                        <span>页</span>
                        <button class="btn btn-outline">确定</button>
                    </div>
                </div>
            </div>

            <!-- 订单详情页 -->
            <div id="orderDetailPage" style="display: none;">
                <!-- 面包屑导航 -->
                <div class="breadcrumb-nav">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">订单管理</li>
                            <li class="breadcrumb-item active">订单详情</li>
                        </ol>
                    </nav>
                    <button class="btn btn-outline" onclick="showOrderList()">
                        <i class="bi bi-arrow-left"></i> 返回列表
                    </button>
                </div>

                <!-- 订单详情 -->
                <div class="card">
                    <div class="card-title">订单信息</div>
                    <div class="order-detail-section">
                        <div class="section-title">基础信息</div>
                        <div class="detail-row">
                            <div class="detail-label">订单号：</div>
                            <div class="detail-value" id="detailOrderId">24100501</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">订单状态：</div>
                            <div class="detail-value"><span class="status-badge status-verified">已核销</span></div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">下单时间：</div>
                            <div class="detail-value">2024-10-05 14:25:30</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">支付时间：</div>
                            <div class="detail-value">2024-10-05 14:30:15</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">核销时间：</div>
                            <div class="detail-value">2024-10-05 15:12:45</div>
                        </div>
                    </div>

                    <div class="order-detail-section">
                        <div class="section-title">用户信息</div>
                        <div class="detail-row">
                            <div class="detail-label">用户ID：</div>
                            <div class="detail-value">U123456</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">用户名：</div>
                            <div class="detail-value">李明</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">手机号：</div>
                            <div class="detail-value">138****1234</div>
                        </div>
                    </div>

                    <div class="order-detail-section">
                        <div class="section-title">店铺信息</div>
                        <div class="detail-row">
                            <div class="detail-label">店铺名称：</div>
                            <div class="detail-value">朝阳店</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">店铺地址：</div>
                            <div class="detail-value">北京市朝阳区xxx街道xxx号</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">联系电话：</div>
                            <div class="detail-value">010-12345678</div>
                        </div>
                    </div>

                    <div class="order-detail-section">
                        <div class="section-title">服务信息</div>
                        <div class="detail-row">
                            <div class="detail-label">服务类型：</div>
                            <div class="detail-value">基础洗头</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">服务时长：</div>
                            <div class="detail-value">20分钟</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">使用机器人：</div>
                            <div class="detail-value">R001 (智能款)</div>
                        </div>
                    </div>

                    <div class="order-detail-section">
                        <div class="section-title">支付信息</div>
                        <div class="detail-row">
                            <div class="detail-label">支付方式：</div>
                            <div class="detail-value">微信支付</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">订单金额：</div>
                            <div class="detail-value">58.00元</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">优惠金额：</div>
                            <div class="detail-value">0.00元</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">实付金额：</div>
                            <div class="detail-value">58.00元</div>
                        </div>
                        <div class="detail-row">
                            <div class="detail-label">交易号：</div>
                            <div class="detail-value">2024100522001234567890</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 取消订单弹窗 -->
    <div class="modal" id="cancelOrderModal">
        <div class="modal-content">
            <div class="modal-header">
                <h5>取消订单</h5>
                <span class="close" onclick="closeCancelOrderModal()">&times;</span>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label>订单号</label>
                    <input type="text" id="cancelOrderId" readonly>
                </div>
                <div class="form-group">
                    <label>取消原因 *</label>
                    <select id="cancelReason" required>
                        <option value="">请选择取消原因</option>
                        <option value="用户主动取消">用户主动取消</option>
                        <option value="店铺无法提供服务">店铺无法提供服务</option>
                        <option value="系统故障">系统故障</option>
                        <option value="其他">其他</option>
                    </select>
                </div>
                <div class="form-group" id="otherReasonGroup" style="display: none;">
                    <label>其他原因说明</label>
                    <textarea id="otherReason" rows="3" placeholder="请输入取消原因"></textarea>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-outline" onclick="closeCancelOrderModal()">取消</button>
                <button class="btn btn-danger" onclick="submitCancelOrder()">确认取消</button>
            </div>
        </div>
    </div>

    <!-- 退款处理弹窗 -->
    <div class="modal" id="refundModal">
        <div class="modal-content">
            <div class="modal-header">
                <h5>处理退款</h5>
                <span class="close" onclick="closeRefundModal()">&times;</span>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label>订单号</label>
                    <input type="text" id="refundOrderId" readonly>
                </div>
                <div class="form-group">
                    <label>退款金额</label>
                    <input type="text" id="refundAmount" readonly>
                </div>
                <div class="form-group">
                    <label>退款原因</label>
                    <textarea id="refundReason" rows="3" placeholder="请输入退款原因"></textarea>
                </div>
                <div class="form-group">
                    <label>处理人</label>
                    <input type="text" id="refundHandler" placeholder="请输入处理人姓名">
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-outline" onclick="closeRefundModal()">取消</button>
                <button class="btn btn-danger" onclick="submitRefund()">确认退款</button>
            </div>
        </div>
    </div>

    <script>
        // 切换侧边栏
        function toggleSidebar() {
            const sidebar = document.getElementById('sidebar');
            sidebar.classList.toggle('collapsed');
        }

        // 显示订单详情
        function showOrderDetail(orderId) {
            document.getElementById('orderListPage').style.display = 'none';
            document.getElementById('orderDetailPage').style.display = 'block';
            document.getElementById('detailOrderId').textContent = orderId;
        }

        // 返回订单列表
        function showOrderList() {
            document.getElementById('orderDetailPage').style.display = 'none';
            document.getElementById('orderListPage').style.display = 'block';
        }

        // 处理时间范围选择
        function handleTimeRangeChange() {
            const timeRange = document.getElementById('timeRange').value;
            if (timeRange === 'custom') {
                alert('请选择自定义时间范围');
            }
        }

        // 导出数据
        function exportData(type) {
            alert(`导出${type === 'current' ? '当前页' : '筛选结果'}数据`);
        }

        // 显示取消订单弹窗
        function showCancelOrderModal(orderId) {
            document.getElementById('cancelOrderId').value = orderId;
            document.getElementById('cancelOrderModal').classList.add('show');
        }

        // 关闭取消订单弹窗
        function closeCancelOrderModal() {
            document.getElementById('cancelOrderModal').classList.remove('show');
        }

        // 提交取消订单
        function submitCancelOrder() {
            const reason = document.getElementById('cancelReason').value;
            if (!reason) {
                alert('请选择取消原因');
                return;
            }
            alert('订单取消成功，已触发退款流程');
            closeCancelOrderModal();
        }

        // 显示退款处理弹窗
        function showRefundModal(orderId) {
            document.getElementById('refundOrderId').value = orderId;
            document.getElementById('refundAmount').value = '58.00元';
            document.getElementById('refundModal').classList.add('show');
        }

        // 关闭退款处理弹窗
        function closeRefundModal() {
            document.getElementById('refundModal').classList.remove('show');
        }

        // 提交退款
        function submitRefund() {
            const handler = document.getElementById('refundHandler').value;
            if (!handler) {
                alert('请输入处理人姓名');
                return;
            }
            alert('退款处理成功');
            closeRefundModal();
        }

        // 取消原因选择事件
        document.getElementById('cancelReason').addEventListener('change', function() {
            const otherReasonGroup = document.getElementById('otherReasonGroup');
            if (this.value === '其他') {
                otherReasonGroup.style.display = 'block';
            } else {
                otherReasonGroup.style.display = 'none';
            }
        });

        // 菜单点击事件
        document.querySelectorAll('.menu-item').forEach(item => {
            item.addEventListener('click', function() {
                document.querySelectorAll('.menu-item').forEach(i => i.classList.remove('active'));
                this.classList.add('active');
            });
        });
    </script>
</body>
</html>